package jwf.action.impl;

import jwf.action.Action;
import jwf.http.Http;
import jwf.http.Request;
import jwf.http.Response;

public class FooAction implements Action {

    @Override
    public boolean match(String uri) {
	return uri.startsWith("/foo");
    }

    @Override
    public int process(Request req, Response res) {
	res.getHeader().add(Http.HH_CONTENT_TYPE, "text/html charset=utf-8");
	res.getHeader().setHttpStatusCode(Http.HC_OK);
	res.outputHeader();
	res.writeRaw("<li>foo</li>");
	return Http.HC_OK;
    }

}
